import 'package:flutter/material.dart';
import 'package:flutter_learning/sqlite/ly_database_manager.dart';
import 'package:flutter_learning/test.dart';

import 'widgets/meta_human_content_view.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '测试',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      debugShowCheckedModeBanner: false,
      home: MyHomePage(
        title: 'wwww',
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String? message;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _test();
  }

  @override
  Widget build(BuildContext context) {
    // var content = "鹅鹅鹅，曲项向天歌，白毛浮绿水，红掌拨清波。";
    // RegExp exp = RegExp(r"[`~!@#$^&*()=|{}':;.<>《》/?！￥…（）—【】‘；：”“。，、？ ]");
    // content = content.replaceAll(exp, " ");
    // debugPrint("=====$content====");
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: InkWell(
        onTap: () {
          Navigator.of(context).push(MaterialPageRoute(builder: (_) {
            return QuizSearchingPlayers();
          }));
        },
        child: Container(
          height: 100,
          width: 200,
          alignment: Alignment.center,
          child: Text('点击'),
        ),
      ),
      // body: const LearningRiverPod(),
      // body: const LYDraggableView(),
      // body: Stack(
      //   fit: StackFit.expand,
      //   children: [
      //     Positioned.fill(
      //         child: Image.network(
      //             'https://v-moment-prod.jikeint.com/admin/0-frank.jpg')),
      //     Positioned.fill(child: HomePage()),
      //   ],
      // ),
    );
  }

  void _test() {}
}
